// dlg.txt

//MK Edit

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 16;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You walk up the gravel path toward the Askama Mines. You try to move quickly. If you go too slow, slime oozes out of the ground and eats away at your shoes.";
	text2 = "You hear rustling sounds, coming from the woods ahead. As you watch, the trees bulge out, blocking part of the path. Thick underbrush grows out of the ground as you watch.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "You try to walk on the remnants of the gravel path. When you walk on the dirt, your feet immediately sink in the slimy mud.";
	text2 = "The vibrations caused by your movement attract the attention of the woods. More slime starts to ooze up out of the dirt. Big globs of it.";
	code =
		sf(this_town,2,1);
		activate_hidden_group(1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "You find a small clan of the Kranas, camped outside. They have hurriedly thrown down a crude plaza of stone slabs, and they sleep and eat on it as much as possible. A small circle of fires burn around their camp, probably to keep the slimes away.";
	text2 = "The Ro here have been fighting off the slimes and the woods for weeks, and they are exhausted. Your arrival doesn't get much of a response. Most of the clan sits around the fire and eats stew.";
	text3 = "One man turns to face you. He nods as you approach.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "The air down in the mine is humid. Clouds of green mist rest around your ankles. The smell of rot makes you gag.";
	text2 = "Tiny bits of ooze constantly seep out of the floor and walls. Occasionally, a drop of the slime from the ceiling falls and burns a hole in your clothes.";
	text3 = "At least you can still breathe. You are definitely getting closer to the heart of the rot.";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "__";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode; //
	tag = 13;
	condition = 1;
	text1 = "This winch is here to haul baskets up this deep shaft. It is currently broken. Acidic slime has gummed up the works.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "A few members of the clan here are hacking away at the encroaching woods, trying to keep them from overgrowing their hall.";
	text2 = "They are keeping even, but only barely.";
	text3 = "Now that you have broken the curse here, they are finally starting to make progress.";
	code =
		if (gf(16,11) == 0)
			rs(3);
			else rs(2);
	break;

begintalknode; // kranas fort guard
	tag = 15;
	condition = 1;
	text1 = "Watch your feet.";
	text2 = "We are cursed.";
	text3 = "Xandrof talks for us.";
	text4 = "We are grateful.";
	text5 = "We mine again soon!.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		if (gf(16,11) == 0)
			as(get_ran(1,1,3));
			else as(get_ran(1,3,5));
	break;

begintalknode;
	tag = 16;
	condition = gf(16,11) == 0 && gf(16,15) == 0;
	text1 = "A cloud of sickening green mist wafts up out of the pit when you get close. You double over, retching.";
	code =
		sf(16,15,3);
		set_char_status(30000,6,3 + difficulty());
	break;
	

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "A hole opens up in the side of the massive mound of goo. It sprays giant blobs of slime at you!";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "The air down here immediately starts to clear. Goo stops oozing out of the floor. The greenish, sickening mist clears.";
	text2 = "Destroying the huge slime blobs at the bottom of the mine has broken the curse, for now. The Kranas will be able to mine here again.";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

//// Xandrof

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "The leader of this clan walks forward to greet you. He has a haunted look in his eyes. Months trying to keep his head above this sea of slime has cracked even the resolve of the Ro.";
	text2 = "_Welcome. You are Haven, yes? I would show you the pride of our clan, but it is lost. I am Xandrof. Enjoy what little hospitality we can offer._";
	text5 = "Xandrof stands before you. He remains upright and proud. He doesn't want to look weak to an outsider. He waits quietly for you to speak.";
	action = INTRO;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "_Tell me about your clan._";
	text1 = "_We are a young clan. Only a few years ago, my family was large enough to split from the father clan. We began our wandering, looking for a place to settle._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Where is your father clan?_";
	text1 = "_Deep in the northern Kranas. Two groups split off at the same time. One family went into the wilds on the road to Achaemin. We wanted to be in a more settled area, closer to trade._";
	text2 = "_We have regretted our decision._";

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_Why did you settle here?_";
	text1 = "_The forest told us. It opened a field for us, with rich soil and veins of ore. The woods were happy to have us then._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_The woods don't seem happy now._";
	text1 = "_The woods of the Kranas only showed their anger recently. It takes a long time for a tree to become angry. When the rage comes, it is impossible to mistake._";

begintalknode;
	state = 10;
	nextstate = 13;
	condition = 1;
	question = "_You seem to have a problem._";
	text1 = "_Yes. The woods are angry. The earth rebels against us. It oozes slimes, which foul our works, control our mine, and try to kill us._";
	text2 = "_Thanks to you, things are quiet, for now. If nothing is done to pacify the forest, the rage will return._";
	code =
		if (gf(16,11) == 0)
			rs(2);
	break;

begintalknode;
	state = 13;
	nextstate = -1;
	condition = gf(16,11) == 0;
	question = "_How do the slimes attack you?_";
	text1 = "They burrow under the earth, slither out, and attack. They can come out at any time. We can't even be inside anymore. They oozed between the floorboards._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = gf(16,11) == 0;
	question = "_Has anyone died?_";
	text1 = "_No, thank the groves. We have been very careful. Our luck will not hold out forever._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = gf(16,11) == 0;
	question = "_How might the slimes be destroyed?_";
	text1 = "_We don't know. We do know that they appeared in our mines first. If the curse has a heart that can be struck, it is down there. We don't have enough warriors to go down there, though._";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = gf(16,11) > 0;
	question = "_Why aren't you inside yet?_";
	text1 = "_We have started cooking and storing things in there, but there is a lot of cleaning that has to take place. The slime got everywhere, and it burns._";

begintalknode;
	state = 10;
	nextstate = 14;
	condition = gf(16,11) == 0;
	question = "_Do you need any help?_";
	text1 = "Xandrof lets out a long sigh. _We do. We are reaching out now. We are looking for a force to retake our tunnels and see what lurks there._";
	
begintalknode;
	state = 14;
	nextstate = 15;
	condition = 1;
	question = "_Perhaps I can help._";
	text1 = "_And perhaps we can pay. You may enter our mines and see what you find. We can even pay for your help. If you are willing to aid us, there is one who does business for our clan. Trader Shohre is in Ssilyn._";

begintalknode;
	state = 14;
	nextstate = -1;
	condition = gf(15,25) == 0;
	question = "_Good luck, then._";
	text1 = "_Thank you, Haven. We don't need luck, though. We need mercy. We need to pacify the woods._";
	action = END_TALK;
	
begintalknode;
	state = 15;
	nextstate = -1;
	condition = gf(15,25) > 0;
	question = "_I have met Shohre._";
	text1 = "_Then you know what we need and what we can offer. You can reach the mines that way._ He points to the door to the north.";

begintalknode;
	state = 10;
	nextstate = 16;
	condition = gf(16,11) > 0;
	question = "_I have purged your mine._";
	text1 = "The Ro listen eagerly as you tell the tale. _We are very grateful, [P]. We have a chance to restore our clan and reclaim this land. We only hope that the peace lasts. I am not sure._";

begintalknode;
	state = 16;
	nextstate = -1;
	condition = 1;
	question = "_What do you mean?_";
	text1 = "_I'm sorry, but I must pay you for your help with truth. The woods here are angry because of the attacks. Attacks that came from outside settlers and from your governor. If nothing is done, the groves will lash out._";
	text2 = "He bows and returns to work.";
	action = END_TALK;
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				